<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>活动发布</title>
<script type="text/javascript">
	function addStudent() {
		var form = document.forms[0];
		form.action = "/springMVC/user/adduser";
		form.method = "get";
		form.submit();

	}
	function selimage(){
		window.open("<%=basePath%>saveactivityimage.jsp","","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width=400,height=240,top="+(screen.availHeight-240)/2+",left="+(screen.availWidth-400)/2+"");}
</script>
</head>
<body>
	<!-- 方法1 -->
	<div style="text-align: center;">
		<h2>发布活动</h2>
	</div>
	<c:if test="${!empty requestScope.message}">
		${requestScope.message}
</c:if>
	<br>
	<form action="/SSH2/addActivity" method="post">
		<div style="padding: 5px;">
			活动标题:<input type="text" name="title"
				style="width: 200px; height: 30px; margin-left: 10px;" />
		</div>
		<div style="padding: 5px; vertical-align: middle;">
			活动内容:
			<textarea name="texts"
				style="margin-left: 10px; width: 250px; height: 150px;" /></textarea>
		</div>
		<div style="padding: 5px;">
			<%-- <div id="imgDiv"><img alt="暂无图片" src="${fileUrl}" /></div> --%>
			<%-- <c:if test="${requestScope.pic !=null}">
				<div><img src="${itemsCustom.pic}" width=100 height=100 /></div>
			</c:if> --%>
			图片名称:
			<input type="text" name="imageUrl" id="image"
				style="width: 200px; height: 30px; margin-left: 10px;" onclick="selimage();" />
					<!-- <input type="file" name="imageUrl" />
        				<input type="submit" value="上 传" /> -->
		</div>
		<br>
		<div style="padding: 5px;">
			<input type="submit" value="发布"
				style="width: 100px; height: 50px; background-color: gray; margin-left: 50px;" />
		</div>
	</form>
	<%-- <h>添加班委</h>
<form action="/SSH2/software/addCommittee"  method="post">
姓名:<input type="text" name="name"/>
性别:<input type="radio" name="sex" value="男" checked="checked"/>男
    <input type="radio" name="sex" value="女"/>女
职务:<input type="text" name="duty"/>
工作简介:<input type="text" name="description"/>
图片：<input type="text" name="imageUrl"/>
<input type="submit" value="添加"/>
</form>
<c:if test="${!empty requestScope.messageSucc}">
		${requestScope.messageSucc}
</c:if>
<c:if test="${!empty requestScope.messageErr}">
		${requestScope.messageErr}
</c:if>

<br>
<h>添加活动</h>
<form action="/SSH2/activity/addActivity"  method="post">
活动标题:<input type="text" name="title"/>
活动内容:<input type="text" name="texts"/>
活动图片：<input type="text" name="imageUrl"/>
<input type="submit" value="添加"/>
</form>
<c:if test="${!empty requestScope.messageSucc}">
		${requestScope.messageSucc}
</c:if>
<c:if test="${!empty requestScope.messageErr}">
		${requestScope.messageErr}
</c:if> --%>
	<!-- 方法2 -->
	<!-- <h>添加用户</h>
<form action="">
姓名:<input type="text" name="username"/>name自动与相同字符实例化
年龄:<input type="text" name="age"/>
<input type="button" value="添加" onclick="addform"/> -->
</body>
</html>